home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
pbaseiv.zip
/
P4UTL007.TIP
< prev
next >
Wrap
Text File
|
1991-12-16
|
2KB
|
47 lines
The IBM PC has suffered for years from the "midnight bug,"
which can cause the machine's calendar to fall behind if
it's left on and not used for more than 24 hours. To get
around this problem, I wrote a RAM-resident program,
FIXDATE.COM, that maintains the correct date. [The file is
included, in executable form, in the P4UTIL directory on
your PowerBase *.* Volume IV diskette.]
Once FIXDATE.COM is created, put it in your AUTOEXEC.BAT
file to keep your PC's calendar up to date.
Irwin Cohen
New York
Editor's note: This program solves a problem that has
plagued users since the original IBM PC was released. The
PC's BIOS sets a yes/no flag--called the "midnight
flag"--each time midnight passes. When DOS calls the BIOS to
check the time, it receives notice that the midnight flag
was raised and updates its calendar. The BIOS automatically
clears the flag after the request.
The problem occurs if the computer has been completely idle
while two or more midnights have passed. The next time the
computer is used, DOS checks the flag, but only receives
notice that the flag was raised; it has no idea that it was
raised more than once. Hence, it advances the calendar by
only one day, and is then a day or more behind.
A different series of events can also cause DOS to miss
advancing its calendar. If another program calls the BIOS
for the time before DOS does, the flag will be lowered and
DOS will never notice that midnight has passed.
FIXDATE.COM solves this problem by lurking in the
background, waiting for midnight to pass. At midnight, the
program instantly calls DOS to check the time. To make sure
no other program has an opportunity to sneak in, it's a good
idea to make FIXDATE.COM the last TSR you load in your
AUTOEXEC file.
Title: Squashing the Midnight Bug
Category: DOS
Issue date: Sep 1991
Editor: Brett Glass
Supplementary files: P4UTIL\FIXDATE.COM